<?php
require_once('Kbs/Model/Mapper/Abstract.php');

class Kbs_Model_Mapper_Post extends Kbs_Model_Mapper_Abstract
{
    protected $_tableClassName = 'Kbs_Model_Table_Post';

    protected $_dataMapper = array(
        'postId'              => 'post_id',
        'postCategoryId'      => 'post_category_id',
        'postAuthorId'        => 'post_author_id',
        'postCreatedAt'       => 'post_date_create',
        'postUpdatedAt'       => 'post_date_last_modify',
        'postUrlTitle'        => 'post_url_title',
    );

    public function setData(Kbs_Model_Business_Abstract $businessObj, Zend_Db_Table_Row $row)
    {
        $businessObj->setPostId($row->post_id)
                    ->setPostCategoryId($row->post_category_id)
                    ->setPostAuthorId($row->post_author_id)
                    ->setPostCreatedAt($row->post_date_create)
                    ->setPostUpdatedAt($row->post_date_last_modify)
                    ->setPostUrlTitle($row->post_url_title);
    }

}